﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using KCL.Code.Business;

namespace KCL.Report
{
    public partial class OrderReport : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (this.Page.IsPostBack == false)
            {
                DateTime currentDate = DateTime.Now;
                txtToDate.Text = currentDate.ToString("dd/MM/yyyy");
                txtFromDate.Text = new DateTime(currentDate.Year, currentDate.Month - 1, currentDate.Day).ToString("dd/MM/yyyy");
            }

            if (Session[SessionManager.InSection] != null)
            {
                if ((int)Session[SessionManager.InSection] != 1)
                {
                    Response.Redirect("../");
                }
            }
            else
            {
                Response.Redirect("../");
            }
        }

        protected void dsOrderReport_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
        {
            //e.InputParameters["txtFromDate"] = txtFromDate.Text.Trim();
            //e.InputParameters["txtToDate"] = txtToDate.Text.Trim();
        }

        protected void btnSearch_Click(object sender, EventArgs e)
        {

        }
    }
}